package com.phiture.erp.basic.core.pojo.dto;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * @author YH
 * @date 2025/4/2
 */

@Schema(description = "管理后台 - 物料库存属性分页 Request DTO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ErpMaterialInventoryPageReqDTO extends PageParam {
    @Schema(description = "物料状态(0:未核准 1:核准 2:禁用 3:已删除)", example = "1")
    private Boolean status;

    @Schema(description = "禁用组织")
    private String freezeOrgUnit;

    @Schema(description = "物料ID", example = "25108")
    private Long materialId;

    @Schema(description = "安全库存")
    private BigDecimal qtySafety;

    @Schema(description = "允许负库存")
    private Boolean isNegative;

    @Schema(description = "使用批号管理")
    private Boolean isBatchNo;

    @Schema(description = "使用序列号管理")
    private Boolean isSequenceNo;

    @Schema(description = "批次管理")
    private Boolean isLotNumber;

    @Schema(description = "条码管理")
    private Boolean isBarcode;

    @Schema(description = "出库优先方式(1:按批次号顺序 2:按批次先进先出 3:按批次后进先出 4:近效期)")
    private Boolean issuePriorityMode;

    @Schema(description = "计量单位", example = "2306")
    private Long unitId;

    @Schema(description = "保质期管理", example = "3468")
    private Boolean isPeriodValid;

    @Schema(description = "保质期", example = "21809")
    private Integer periodValid;

    @Schema(description = "保质期单位(1:年 2:月 3:日)")
    private Boolean periodValidUnit;

    @Schema(description = "采购提前期(天)")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Integer[] purchasingAheadDate;

    @Schema(description = "默认仓库", example = "22682")
    private Long defaultWarehouseId;

    @Schema(description = "是否检验")
    private Boolean isCheck;

    @Schema(description = "质检组织", example = "18496")
    private Long qualityOrgId;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;
}
